<?php



class PlacesMapBuilder implements MapBuilder {

	
	const CLASS_NAME = 'lib.model.openbravo.map.PlacesMapBuilder';

	
	private $dbMap;

	
	public function isBuilt()
	{
		return ($this->dbMap !== null);
	}

	
	public function getDatabaseMap()
	{
		return $this->dbMap;
	}

	
	public function doBuild()
	{
		$this->dbMap = Propel::getDatabaseMap(PlacesPeer::DATABASE_NAME);

		$tMap = $this->dbMap->addTable(PlacesPeer::TABLE_NAME);
		$tMap->setPhpName('Places');
		$tMap->setClassname('Places');

		$tMap->setUseIdGenerator(false);

		$tMap->addPrimaryKey('ID', 'Id', 'VARCHAR', true, 255);

		$tMap->addColumn('NAME', 'Name', 'VARCHAR', true, 255);

		$tMap->addColumn('X', 'X', 'INTEGER', true, 11);

		$tMap->addColumn('Y', 'Y', 'INTEGER', true, 11);

		$tMap->addForeignKey('FLOOR', 'Floor', 'VARCHAR', 'FLOORS', 'ID', true, 255);

	} 
} 